<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8"/>
	<title>用户组添加用户 - bjyadmin</title>
    <link rel="stylesheet" href="__ADMIN_STATICS__/bootstrap/dist/css/bootstrap.css" type="text/css" />
    <link rel="stylesheet" href="__ADMIN_STATICS__/animate.css/animate.css" type="text/css" />
    <link rel="stylesheet" href="__ADMIN_STATICS__/font-awesome/css/font-awesome.min.css" type="text/css" />
    <link rel="stylesheet" href="__ADMIN_STATICS__/simple-line-icons/css/simple-line-icons.css" type="text/css" />
    <link rel="stylesheet" href="__ADMIN_STATICS__/app/css/font.css" type="text/css" />
    <link rel="stylesheet" href="__ADMIN_STATICS__/app/css/app.css" type="text/css" />
</head>
<body>
<div class="wrapper-md">
    <div class="panel panel-default">
        <div class="panel-heading">
            <div class="row">
                <div class="col-sm-3">
                    <a href="{:U('Admin/Index/welcome')}"><i class="fa fa-home"></i>&nbsp;首页&nbsp;&gt;&nbsp;&nbsp;<a href="{:U('Admin/Rule/group')}">用户组列表</a>&nbsp;&gt;&nbsp;&nbsp;添加成员
                </div>
            </div>
        </div>
        <div class="panel-body">
            <form action="{:U('Admin/Rule/check_user',array('group_id'=>$group_id))}" method="get">
                用户名：
                <input type="text" name="username" value="{$username}" class="form-control input-sm w-sm inline m-r v-middle"/>
                <button type="submit" class="btn btn-sm btn-default">搜索</button>
            </form>
        </div>
        <div class="table-responsive">
            <table class="table table-bordered table-striped table-hover table-condensed b-t b-light">
                <thead>
                    <tr>
                        <th width="10%">用户名</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <foreach name="user_data" item="v">
                        <tr>
                            <th>{$v['username']}</th>
                            <td>
                                <if condition="in_array($v['id'],$uids)">
                                    已经是{$group_name}
                                    <a href="{:U('Admin/Rule/delete_user_from_group',array('uid'=>$v['id'],'group_id'=>$group_id))}" class="btn btn-danger btn-xs">撤销</a>
                                <else/>
                                    <a href="{:U('Admin/Rule/add_user_to_group',array('uid'=>$v['id'],'group_id'=>$group_id,'username'=>$username))}" class="btn btn-info btn-xs">设为{$group_name}</a>
                                </if>
                            </td>
                        </tr>
                    </foreach>
                </tbody>
            </table>
        </div>
        <footer class="panel-footer">
            <div class="row text-center">
            {$page}
            </div>
        </footer>
    </div>
</div>
<script src="__ADMIN_STATICS__/jquery/jquery.min.js"></script>
<script src="__ADMIN_STATICS__/bootstrap/dist/js/bootstrap.js"></script>
</body>
</html>
